Add "flit info --version" command #263
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds a new subcommand
infowith the argument--version.Calling
flit info --versionwill simply print the package version number to stdout. As the version number is missing inpyproject.tomlwhen usingflit, this command allows external tools to easily access the projects version number.I did not implement this as
flit --versionas that woulc conflict with the existing flag. Having is as subcommand also makes it a bit more expressive. This PR adds the new subcommand "info" which could serve as a container for additional "informational" commands.Questions to the maintainer(s):
I also - out of habit - added a type annotation. To be on the safe side, I used the Python2 syntax. But personally I prefer the Python 3 syntax. What is your position on this? If it is OK with you I will switch to the Py3 syntax.
Unrelated to this PR, I will also quickly refactor the subcommands. This will be a fairly big change and might trigger some discussion. How do hold discussions? Do you have a mailing-list? A IRC channel? Or should I simply add an issue & PR in "WIP" status and use GitHub comments for discussion?